package com.d0330.Z30;

import java.util.Comparator;

public class TestCompator implements Comparator<Record1> {
    @Override
    public int compare(Record1 o1, Record1 o2) {
        if(o1.getAmount()>o2.getAmount()){
            return -1;
        }else if (o1.getAmount()<o2.getAmount()){
            return 1;
        }else{
            return 0;
        }
    }
}
